<?php

function getHttpResponsePOST($url, $opt = array(),$post_data)
{
	$setopt = array(
			CURLOPT_HEADER => 0,                        //设置header
			CURLOPT_RETURNTRANSFER => 1,       //要求结果为字符串且输出到屏幕上
			CURLOPT_URL => $url,
			CURLOPT_POST => 1,                            //post提交方式
			CURLOPT_POSTFIELDS => $post_data, // 需要Post的数据..
	);

	if ( !empty($opt) ) {
		$setopt = array_merge($setopt, $opt);
	}

	$curl = curl_init($url);

	foreach ($setopt as $key => $value) {
		curl_setopt($curl, $key, $value );
	}

	$responseText = curl_exec($curl);

	curl_close($curl);

	return $responseText;
}